package com.zac.polymorphism;

public class TestMain {
	public static void main(String[] args) {
		
		ForTest t1;
		ForTest t2;
		t1 = new SayHello();
		t2 = new SayDamn();
		
		if(t1 instanceof SayHello){
			t1.saySome();
		}
		System.out.println(t1.getClass().getCanonicalName());
		if(t2 instanceof SayDamn){
			t2.saySome();
		}
		System.out.println(t2.getClass().getCanonicalName());
		
	}
}
